package uz.edo.db.manager;

import uz.edo.db.bean.Role;
import uz.edo.db.manager.core.DBManager;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: said
 * Date: 1/16/12
 * Time: 11:09 AM
 * To change this template use File | Settings | File Templates.
 */
public class RoleManager extends DBManager{
    private static RoleManager instance = new RoleManager();

    public static RoleManager getInstance(){
        return instance;
    }

    public RoleManager() {
        super(Role.class);
    }

    public List<Role> getRoles() throws Exception {
        return createQuery("from Role r where r.name <> 'su'").list();
    }
}
